<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head >
  <meta charset="UTF-8">
  <title>登录页面</title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="format-detection" content="telephone=no">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="alternate icon" type="image/png" href="../../static/AmazeUI/assets/i/favicon.png">
  <link rel="stylesheet" href="http://cdn.amazeui.org/amazeui/2.7.2/css/amazeui.css"/>

  <style>
    .header {
      text-align: center;
    }
    .header h1 {
      font-size: 200%;
      color: #333;
      margin-top: 30px;
    }
    .header p {
      font-size: 14px;
    }
  </style>
</head>
<body>
<div class="header">
  <div class="am-g">
    <h1>我的博客</h1>
    <p>Integrated Development Environment<br/>为梦想而生</p>
  </div>
  <hr />
</div>
<div class="am-g">
  <div class="am-u-lg-6 am-u-md-8 am-u-sm-centered">
    <form method="post" action="/admin/login" class="am-form">
      <label for="username">用户名:</label>
      <input type="text" name="username" id="username" value="">
      <br>
      <label for="password">密码:</label>
      <input type="password" name="password" id="password" value="">
      <br>
      <label for="remember-me">
        <input id="remember-me" type="checkbox">
        记住密码
      </label>
      <br />
      <div class="am-cf">
        <input type="submit" id="login_btn" value="登 录" class="am-btn am-btn-primary am-btn-sm am-fl">
          <input type="button" id="" value="忘记密码 ^_^? " class="am-btn am-btn-default am-btn-sm am-fr">
          <input type="button" id="register_btn" value="注 册 " class="am-btn am-btn-default am-btn-sm am-fr">
      </div>
    </form>
    <hr>
    <p>© 2014 AllMobilize, Inc. Licensed under MIT license.</p>
  </div>
</div>

<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
<script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>

<script>
  $(function () {
    /*$("#login_btn").click(function () {
      var data1 = {
        "username": $("#username").val(),
        "password": $("#password").val()
      }
      $.ajax({
        url: "/admin/login",
        data: data1,
        type: "GET",
        dataType:"json",
        success: function (data) {
          //alert(data.status);
          if (data.status==200) {
            //跳转到主页
              window.location.href = '/admin/index';
          } else {
            alert("用户名或密码不对");
          }
        }
      });
    });*/

    $("#register_btn").click(function () {
        //跳转到注册页面
        window.location.href = '/admin/registerPage';
    });
  });
</script>
</body>
</html>
